package com.dkm.nettysocketdemo;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;

@SpringBootApplication
public class NettysocketdemoApplication  extends SpringBootServletInitializer {

    public static void main(String[] args) {
        SpringApplication.run(NettysocketdemoApplication.class, args);
        /*ApplicationContext applicationContext = ;
        try {
            applicationContext.getBean(NettyConfig.class).start();
        } catch (Exception e) {
            System.out.println("NettyServerError:" + e.getMessage());
        }*/

    }



  //为了打包springboot项目
    @Override
    protected SpringApplicationBuilder configure(
            SpringApplicationBuilder builder) {
        return builder.sources(this.getClass());
    }

}
